import 'package:flutter_homemonitor/generated/json/base/json_field.dart';
import 'package:flutter_homemonitor/generated/json/all_detect_item_entity.g.dart';
import 'dart:convert';
export 'package:flutter_homemonitor/generated/json/all_detect_item_entity.g.dart';

List<AllDetectItemEntity> getAllDetectItemEntityList(List<dynamic> list) {
  List<AllDetectItemEntity> result = [];
  list.forEach((item) {
    result.add(AllDetectItemEntity.fromJson(item));
  });
  return result;
}

@JsonSerializable()
class AllDetectItemEntity {
  @JSONField(name: "Id")
  late int id;
  @JSONField(name: "ItemCode")
  late String itemCode;
  @JSONField(name: "ItemName")
  late String itemName;
  @JSONField(name: "City")
  late String city;
  @JSONField(name: "District")
  late String district;
  @JSONField(name: "CreateTime")
  late String createTime;
  @JSONField(name: "UpdateTime")
  late String updateTime;
  @JSONField(name: "Memo")
  late String memo;
  @JSONField(name: "ItemStats")
  late String itemStats;
  @JSONField(name: "ReportNumber")
  dynamic reportNumber;
  @JSONField(name: "InspectionType")
  dynamic inspectionType;
  @JSONField(name: "ProjectManagerID")
  dynamic projectManagerID;
  @JSONField(name: "Address")
  dynamic address;
  @JSONField(name: "ProjectState")
  dynamic projectState;
  @JSONField(name: "Implementation")
  dynamic implementation;
  @JSONField(name: "InTime")
  dynamic inTime;
  @JSONField(name: "Progress")
  dynamic progress;
  @JSONField(name: "Analysis")
  dynamic analysis;
  @JSONField(name: "ContractId")
  late double contractId;
  @JSONField(name: "EditAssociatedData")
  dynamic editAssociatedData;
  @JSONField(name: "BuildingList")
  late List<dynamic> buildingList;

  AllDetectItemEntity();

  factory AllDetectItemEntity.fromJson(Map<String, dynamic> json) =>
      $AllDetectItemEntityFromJson(json);

  Map<String, dynamic> toJson() => $AllDetectItemEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
